<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Api-Document</title>
<link rel="stylesheet" type="text/css" href="__CSS__/style.css">
</head>
<body>
<div class="left_bar">
	<ul>
		<li><a href="{:Url('Doc/Book/index?id='.I('id'))}">基础参数</a></li>
		<volist name="list" id="vo">
		<li><a href="{:Url('Doc/Book/index?id='.I('id').'&doc='.$vo['id'])}">{$vo.title}</a></li>
		</volist>
		<li><a href="{:Url('Doc/Index/index')}">文档首页</a></li>
	</ul>
</div>

<div class="right_bar">
<notempty name="doc">
	<h2>{$doc.title} <span class="blue">{$doc.name}</span></h2>
	<table>
		<thead>
			<tr>
				<th width="80">接口名称</th>
				<th width="80">操作请求</th>
				<th width="250">参数说明</th>
				<th>错误说明</th>
				<th>返回示例</th>
				<th width="80">创建时间</th>
				<th width="80">更新时间</th>
			</tr>
		</thead>
		<tbody>
			<volist name="actionlist" id="vo">
			<tr>
				<td>{$vo.title}</td>
				<td>{$vo.cmd}</td>
				<td>{$vo.params}</td>
				<td>{$vo.error}</td>
				<td>{$vo.request}</td>
				<td>{$vo.create_time|time_format}</td>
				<td>{$vo.update_time|time_format}</td>
			</tr>
			</volist>
		</tbody>
	</table>
<else/>
	<h2>基础参数</h2>
	<table>
		<thead>
			<tr>
				<th>接口地址</th>
				<th>请求方式</th>
				<th>POST参数</th>
				<th>操作参数</th>
				<th>加密密钥</th>
				<th>测试参数</th>
				<th>工具</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>{$info.url}</td>
				<td>POST</td>
				<td>param</td>
				<td>cmd</td>
				<td><!-- {$info.key} --></td>
				<td>URL?debug=1 (return JSON)</td>
				<td><a href="{:U('Doc/Make/index?id='.I('id'))}">加密工具</a> <a href="{:U('Doc/Make/decode?id='.I('id'))}">解密工具</a></td>
			</tr>
			<tr>
				<td>示例</td>
				<td colspan="6">URL:{$info.url}Member;POST:param="AES(josn(array(cmd=>del,uid=>5,agent=>10)))"</td>
			</tr>
		</tbody>
	</table>

	<h2>全局返回码</h2>
	<table>
		<thead>
			<tr>
				<th width="150"></th>
				<th width="130">状态码(status)</th>
				<th>状态说明</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td rowspan="7" class="rowspan">全局状态</td>
				<td>0</td>
				<td>请求成功</td>
			</tr>
			<tr>
				<td>1000</td>
				<td>接口参数错误</td>
			</tr>
			<tr>
				<td>1001</td>
				<td>接口不存在</td>
			</tr>
			<tr>
				<td>1010</td>
				<td>用户不存在</td>
			</tr>
			<tr>
				<td>1020</td>
				<td>商户不存在</td>
			</tr>
			<tr>
				<td>9999</td>
				<td>参数不完整</td>
			</tr>
			<tr>
				<td>rumtime</td>
				<td>程序执行时间(秒) 只有debug模式下才会输出</td>
			</tr>
		</tbody>
	</table>
</notempty>
</div>
</body>
</html>